<!--
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<kd-warnings warnings="::ctrl.replicaSetDetail.errors"></kd-warnings>

<div layout="row">
  <kd-graph-card graph-title="[[CPU usage|Title for graph card displaying CPU metric of one replica set.]]"
                 metrics="::ctrl.replicaSetDetail.podList.cumulativeMetrics"
                 selected-metric-names="'cpu/usage_rate'">
  </kd-graph-card>
  <kd-graph-card graph-title="[[Memory usage|Title for graph card displaying memory metric of one replica set.]]"
                 graph-info="[[The memory usage includes the caches in the pods managed by this replica set.|Help message detailing what is included in the memory usage]]"
                 metrics="::ctrl.replicaSetDetail.podList.cumulativeMetrics"
                 selected-metric-names="'memory/usage'">
  </kd-graph-card>
</div>

<kd-replica-set-info replica-set="::ctrl.replicaSetDetail"></kd-replica-set-info>
<kd-content-card>
  <kd-content>
    <kd-pod-card-list pod-list="::ctrl.replicaSetDetail.podList"
                      with-statuses="true"
                      pod-list-resource="::ctrl.replicaSetPodsResource">
      <kd-empty-list-text>
        [[There are currently no Pods managed by this Replica Set|Text for pods card zerostate in replica set details page.]]
      </kd-empty-list-text>
    </kd-pod-card-list>
  </kd-content>
</kd-content-card>
<kd-content-card>
  <kd-content>
    <kd-service-card-list service-list="::ctrl.replicaSetDetail.serviceList"
                          service-list-resource="::ctrl.replicaSetServicesResource">
      <kd-empty-list-text>
        [[There are currently no Services with the same label selector as this Replica Set.|Text for services card zerostate in replica set details page.]]
      </kd-empty-list-text>
    </kd-service-card-list>
  </kd-content>
</kd-content-card>

<kd-content-card>
  <kd-content>
    <kd-horizontal-pod-autoscaler-card-list horizontal-pod-autoscaler-list="::ctrl.replicaSetDetail.horizontalPodAutoscalerList">
      <kd-empty-list-text>
        [[There are currently no Horizontal Pod Autoscalers targeting this Replica Set.|Text for horizontal pod autoscalers card zerostate in replica set details page.]]
      </kd-empty-list-text>
    </kd-horizontal-pod-autoscaler-card-list>
  </kd-content>
</kd-content-card>

<kd-event-card-list event-list="::ctrl.replicaSetDetail.eventList"
                    event-list-resource="::ctrl.eventListResource"></kd-event-card-list>
